package com.kgc.xsProvider.controller;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.xs.pojo.SalesCounter;
import com.kgc.xs.remote.AddSalesCodeRemote;
import com.kgc.xsProvider.service.SalesCounterService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.util.Map;

@Controller
public class SalesCounterController  implements AddSalesCodeRemote {

    private Logger logger= LoggerFactory.getLogger(SalesCounterController.class);

    @Autowired
    private SalesCounterService salesCounterService;
    @Override
    public ResponseMsg addSalesCode(Map<String, Object> map) {
        logger.info("SalesCounterController addSalesCode params{}",map.toString());
        ResponseMsg responseMsg = salesCounterService.getCounterByTypeAndDate(map);
        logger.debug("SalesCounterController getCounterByTypeAndDate{}",responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg insertCounter(SalesCounter salesCounter) {
        return null;
    }

    @Override
    public ResponseMsg incrementSeq(Map<String, Object> map) {
        return null;
    }
}
